#!/usr/bin/env python
# -*- coding: utf-8 -*-

""" This module defines the routing rules. 

dict:
  ROUTINGS: key is the routing pattern, value is the parameters
"""

ROUTINGS = [
    ('/', {
        'params': {
            'controller': 'welcome',
            'action': 'index'
        }
    }),
    
    ('/forum/create', {
        'params': {
            'controller': 'forum',
            'action': 'create'
        }
    }),
    
    ('/forum/:permalink/feed.:type', {
        'params': {
            'controller': 'forum',
            'action': 'feed'
        }
    }),

    ('/forum/:permalink/topic/:topicId', {
        'params': {
            'controller': 'topic',
            'action': 'show'
        }
    }),
        
    ('/forum/:permalink', {
        'params': {
            'controller': 'forum',
            'action': 'show'
        }
    }),
    
    ('/u/:username', {
        'params': {
            'controller': 'user',
            'action': 'show'
        }
    }),
    
    ('/:controller/:action/:key', {}),

    ('/:controller/:action', {}),

    ('/:controller', {}),
]
